Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(android): gradle 8 #14014

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AbdullahFaqeir
Copy link

chore(android): let there be gradle 8
chore(android): fixed deprecations in kroll-apt project
chore(android): made kroll-apt incremental to enhance build time

GitHub issue: #13579

This PR is dedicated to my mentor Nafe Abboushi.

chore(android): fixed deprecations in kroll-apt project
chore(android): made kroll-apt incremental to enhance build time
@m1ga m1ga self-requested a review March 23, 2024 20:25
Copy link
Contributor

@m1ga m1ga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the changes to the JAVA files necessary for the update? The more stuff that is changed, the more we have to test 😉

Also I wouldn't update the min and targetSDK with this PR. If we still can use 21 we should do that too. Same with target 34. I have a PR for that here #13940 as the broadcast receiver has to be adjusted.

So if that is not needed for the gradle PR please keep it as it is and do it in a separate PR (less changes, less testing).

I couldn't build a SDK locally. It's almost working but the last step titaniumPublication(MavenPublication) tries to publish it online instead of making a local repo? I've canceled it as it was uploading stuff 😄 Didn't want to publish something I don't need.

There aren't all cmake version available during build process. I have a different PR about that #13966 and I had to use 3.22.1 as that is available on all platforms.

fix(android): gradle 8 compatibility update to template build.gradle
fix(android): revert dependency updates
fix(android): revert minSdk and targetSdk
Copy link
Author

@AbdullahFaqeir AbdullahFaqeir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reviews applied.

fix(android): update _build.js & _buildModule.js for new gradle
@m1ga m1ga mentioned this pull request Mar 26, 2024
@m1ga m1ga changed the title chore(android): let there be gradle 8 chore(android): gradle 8 Mar 26, 2024
@m1ga
Copy link
Contributor

m1ga commented Mar 26, 2024

I have to do some testing but the first round was very good and I was able to build kitchensink an my app now 👍

Review will follow once I have more time to test

@m1ga m1ga self-assigned this Mar 26, 2024
Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is AWESOME! I don't wanna lose momentum on this PR.

I found a few indention nitpicks. I haven't tested the PR yet, but I spent some time researching some of the changes such as no longer need to call .setPackageName(). Good stuff!

What sort of testing do we need to do to get this over the finish line? I can test on Windows doing emulator builds as well as build-only device/dist builds. I don't have any working Android devices. Sigh.


repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.android.tools.build:gradle:8.3.1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the newest Gradle version we can upgrade to? I see 8.3 is over 8 months and 8.7 dropped about a month ago.

Comment on lines +27 to +28
'src/main/assets',
"${projectDir}/../titanium/build/outputs/ti-assets"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these indentations intentional?

Suggested change
'src/main/assets',
"${projectDir}/../titanium/build/outputs/ti-assets"
'src/main/assets',
"${projectDir}/../titanium/build/outputs/ti-assets"

tiAndroidXCoreLibVersion = '1.9.0'
tiAndroidXFragmentLibVersion = '1.5.7'
tiMaterialLibVersion = '1.6.1'
tiPlayServicesBaseLibVersion = '18.2.0'
tiManifestPlaceholders = [
tiActivityConfigChanges: 'density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode'
tiActivityConfigChanges: 'density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional indention?

Suggested change
tiActivityConfigChanges: 'density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode'
tiActivityConfigChanges: 'density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode'

Comment on lines +62 to +64
'kroll.outputJsonFilePath': "${projectDir}/../../dist/android/titanium.bindings.json".toString(),
'kroll.outputCppDirPath' : "${projectDir}/../runtime/v8/generated".toString(),
'kroll.jsModuleName' : 'titanium'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional indention?

Suggested change
'kroll.outputJsonFilePath': "${projectDir}/../../dist/android/titanium.bindings.json".toString(),
'kroll.outputCppDirPath' : "${projectDir}/../runtime/v8/generated".toString(),
'kroll.jsModuleName' : 'titanium'
'kroll.outputJsonFilePath': "${projectDir}/../../dist/android/titanium.bindings.json".toString(),
'kroll.outputCppDirPath' : "${projectDir}/../runtime/v8/generated".toString(),
'kroll.jsModuleName' : 'titanium'

Comment on lines +90 to +91
'assets',
"${projectDir}/../modules/ui/assets"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional indention?

Suggested change
'assets',
"${projectDir}/../modules/ui/assets"
'assets',
"${projectDir}/../modules/ui/assets"

Comment on lines +116 to +117
'res',
"${projectDir}/../modules/ui/res"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional indention?

Suggested change
'res',
"${projectDir}/../modules/ui/res"
'res',
"${projectDir}/../modules/ui/res"

Comment on lines +142 to +143
"set(LIBV8_VERSION \"${packageJson.v8.version}\")",
"set(LIBV8_MODE \"${packageJson.v8.mode}\")"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional indention?

Suggested change
"set(LIBV8_VERSION \"${packageJson.v8.version}\")",
"set(LIBV8_MODE \"${packageJson.v8.mode}\")"
"set(LIBV8_VERSION \"${packageJson.v8.version}\")",
"set(LIBV8_MODE \"${packageJson.v8.mode}\")"

Comment on lines +30 to +33
compression: project.properties.compression,
overwrite: project.properties.overwrite,
src: project.properties.src,
dest: project.properties.dest)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional indention?

Suggested change
compression: project.properties.compression,
overwrite: project.properties.overwrite,
src: project.properties.src,
dest: project.properties.dest)
compression: project.properties.compression,
overwrite: project.properties.overwrite,
src: project.properties.src,
dest: project.properties.dest)

@m1ga
Copy link
Contributor

m1ga commented May 1, 2024

What sort of testing do we need to do to get this over the finish line?

👍 @cb1kenobi I would love to split this up into smaller steps as this is a big PR:
#13579 (comment)
I have made older PRs: first one only updates the gradle files to the newer syntax, 2nd one updates cmake and checkstyle (looks much but it's only linting). Then we only have the gradle 8 parts in here and can focus on that as it's a bigger change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants